Przykad 5.6. Przykad metody hashCode w Javie
public int hashCode() {
   int h = hash;
   if (h == 0) {
      for (int i = 0; i < chars.length; i++) {
         h = 31*h + chars[i];
      }
      hash = h;
   }
   return h;
}
